package com.atguigu.spring5.bean1.service;
import com.atguigu.spring5.bean1.Dao.UserDao;
/**
 * @author liangchao
 * @create 2021-06-10 14:19
 */
public class UserService {

    private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
    public void add(){
        System.out.println("user service add ....");
        // 通过xml注入属性
        userDao.add();
        // 调用dao层 原始做法
//        UserDao dao = new UserDaoImpl();
//        dao.add();

    }
}
